/**
 * tabs
 * @return
 */
function tabs(tabTitle,tab_content,event){
		var index=$(tabTitle).children(".hover").index()
		$(tab_content).children().eq(index).show().siblings().hide();
		$(tabTitle).children().bind(event,function(){
			var index=$(this).index();
		  	$(this).addClass("hover").siblings().removeClass("hover"); 
			$(tab_content).children().eq(index).show().siblings().hide();
			return false;
		});
}
/**
 * 阅读页字体放大缩小 
 * @return
 */
$(function(){
	var fontSize=$(".articleTime span")
	var articleBox=$(".articleBox")
	fontSize.click(function(){
		$(this).addClass("hover").siblings().removeClass("hover")
		var fontHtml=$(this).html();
		if(fontHtml=="小")
		{
			articleBox.css({"font-size":"12px"})
		}
		else if((fontHtml=="中"))
		{
			articleBox.css({"font-size":"14px"})
		}
		else if((fontHtml=="大"))
		{
			articleBox.css({"font-size":"18px"})
		}
	})
})
//酷播迷你CuPlayerMiniV4.0/代码开始
	function videoPlayer(videoUrl,videoImg,videoW,videoH){	
		
	  var so = new SWFObject("/Public/front/flash/CuPlayerMiniV20_Black_S.swf", "CuPlayer", videoW, videoH, "9", "#000000");
	  so.addParam("allowfullscreen", "true");
	  so.addParam("allowscriptaccess", "always");
	  so.addParam("wmode", "opaque");
	  so.addParam("quality", "high");
	  so.addParam("salign", "lt");
	  so.addVariable("CuPlayerFile",videoUrl);
	  so.addVariable("CuPlayerShowImage", "false");
	  so.addVariable("CuPlayerImage",videoImg);//视频略缩图,本图片文件必须正
	  so.addVariable("CuPlayerWidth", videoW);
	  so.addVariable("CuPlayerHeight", videoH);
	  so.addVariable("CuPlayerAutoPlay", "false");
	  so.addVariable("CuPlayerAutoRepeat", "false");
	  so.addVariable("CuPlayerShowControl", "true");
	  so.addVariable("CuPlayerAutoHideControl", "false");
	  so.addVariable("CuPlayerAutoHideTime", "6");
	  so.addVariable("CuPlayerVolume", "80");
	  so.write("CuPlayer");	
		
	}

//酷播迷你CuPlayerMiniV4.0/代码结束

//酷播迷你CuPlayerMiniV4.0/代码开始
function videoPlayer2(videoUrl,videoImg,videoW,videoH){	
	
  var so = new SWFObject("/Public/front/flash/CuPlayerMiniV20_Black_S.swf", "CuPlayer2", videoW, videoH, "9", "#000000");
  so.addParam("allowfullscreen", "true");
  so.addParam("allowscriptaccess", "always");
  so.addParam("wmode", "opaque");
  so.addParam("quality", "high");
  so.addParam("salign", "lt");
  so.addVariable("CuPlayerFile",videoUrl);
  so.addVariable("CuPlayerShowImage", "false");
  so.addVariable("CuPlayerImage",videoImg);//视频略缩图,本图片文件必须正
  so.addVariable("CuPlayerWidth", videoW);
  so.addVariable("CuPlayerHeight", videoH);
  so.addVariable("CuPlayerAutoPlay", "false");
  so.addVariable("CuPlayerAutoRepeat", "false");
  so.addVariable("CuPlayerShowControl", "true");
  so.addVariable("CuPlayerAutoHideControl", "false");
  so.addVariable("CuPlayerAutoHideTime", "6");
  so.addVariable("CuPlayerVolume", "80");
  so.write("CuPlayer2");	
	
}

//酷播迷你CuPlayerMiniV4.0/代码结束
/**
 * tabsURL 
 * @return
 */
function tabsURL(tabsURLClass){
	var title1Tab=$(tabsURLClass).find("a")
	
	title1Tab.hover(function(){
		var URL=$(this).attr("href")
		$(this).parent("span").siblings("em").find("a").attr("href",URL)
	})
}

$(document).ready(function() {
	//选项卡
	tabs(".title1 span",".newsCon","hover");
	/*导航*/
	$(".menu_dl dd").hover(function(){
		$(".menu_dl dd.hover").addClass("active").removeClass('hover')
		$(this).addClass("hover")
		}
		,function(){
			$(this).removeClass("hover")
			$(".menu_dl dd.active").addClass("hover").removeClass("active")
	})
	//通知滚高滚动
	$(".noticeL_list").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:true,vis:1});
	//焦点图
	$(".focus").slide({mainCell:".bd ul",effect:"fade",autoPlay:true});
	//焦点图
	$(".quick_menu").slide({mainCell:".bd ul",effect:"leftLoop",autoPlay:true,vis:8});
	//学生工作最后一个去下划线
	$(".newsList2_div1 dd:last").css("border-bottom","none")
	$(".newsList2_div2 dd:last").css("border-bottom","none")
	
	//二级侧导航
	$(".leftNav dd").each(function() {
		var num=$(this).find("div a").length
		if(num==0){
			$(this).find("span").addClass("no")
		}
    });
	//选项卡链接
	tabsURL(".title1 span")
	//2015-5-30新加  导航去掉最后一个下划线
	$(".menu_dl dd:last").children("i").css("display","none");	
})